<ion-view view-title="会员信息" hide-tabs="false">
  <!-- 头部 -->
  <ion-header-bar align-title="center" class="bar-positive" >
    <h1 class="title">会员信息</h1>
  </ion-header-bar>
  <ion-content id="mine" [scroll="true"] [overflow-scroll="true"]>
    <!-- <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher> -->
    <!-- 登录的情况下 -->
    <div class="top" ng-show="top_info">
      <div class="list">
          <div class="item item-avatar" style="background: #39383A;">
            <img ng-src="{{imgSrc}}">
            <h2 style="position:relative;">
              {{phone}}
              <span class="member">{{card_grade}}</span>
            </h2>
            <span class = "qr" ui-sref="tab.m_QR({id:card_num})" >
              <img ng-src="img/icons/W_QR.png" alt="二维码" class="img_QR">
              <span> 会员二维码</span>
            </span> 
          </div>
        </div>
        <div class="row" >
          <div class="col-33" ui-sref="tab.integral">
            {{integral}}
            <p> 积分</p>
          </div>
          <div class="col-33" ui-sref="tab.coupon">
             {{coupon_count}}
            <p> 优惠券</p>
          </div>
          <div class="col-33" ui-sref="tab.collection">
            <i class="icon ion-heart" style="color:red;font-size:28px;"></i>
            <p> 收藏</p>
          </div>
        </div>
    </div>


    
    <div class="bottom" ng-show="top_info">
      <div class="list">
        <a class="item" ui-sref="tab.consume" >
          线上消费记录
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item" ui-sref="tab.storeconsume" >
          线下消费记录
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ui-sref="tab.personal_info">
          个人信息
          <i class="icon ion-chevron-right right"></i>
        </a>
        <!-- 新消息通知 -->
        <!-- <ion-toggle ng-repeat="item in settingsList"
          ng-model="item.checked" 
          ng-checked="item.checked">
        {{ item.text }}
        </ion-toggle> -->
        <!-- 新消息通知 -->
        <a class="item"  ui-sref="tab.suggestion">
          意见反馈
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ui-sref="tab.language">
          语言/Language
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ui-sref="tab.set">
          设置
          <i class="icon ion-chevron-right right"></i>
        </a>
      </div>
      <div class="list" id="Sign_out" ng-click="Sign_out()" >
        <a class="item">
          退出登录
        </a>
      </div>
    </div>
    <!-- 登录的情况下 -->




    <!-- 未登录的情况下 -->
    <div class="top" ng-hide="top_info">
      <div class="list">
          <a class="item item-avatar" style="background: #39383A;">
            <img ng-src="img/icons/tx.png">
            <h2 ng-click=" modal.show()">
            登录/注册
            </h2>
          </a>
        </div>
        <div class="row" >
          <div class="col-33" ng-click="goQR()"><!-- ng-click=" modal.show()" -->
            0
            <p> 积分</p>
          </div>
          <div class="col-33" ng-click=" modal.show()">
            0
            <p> 优惠卷</p>
          </div>
          <div class="col-33" ng-click=" modal.show()">
            <i class="icon ion-heart" style="color:red;font-size:28px;"></i>
            <p> 搜藏</p>
          </div>
        </div>
    </div>
    <div class="bottom" ng-hide="top_info">
      <div class="list">
        <a class="item" ng-click=" modal.show()">
          线上消费记录
          <i class="icon ion-chevron-right right"></i>
        </a>
         <a class="item" ng-click=" modal.show()">
          线下消费记录
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ng-click=" modal.show()">
          个人信息
          <i class="icon ion-chevron-right right"></i>
        </a>
        <!-- 新消息通知 -->
        <!-- <ion-toggle ng-repeat="item in settingsList"
          ng-model="item.checked" 
          ng-checked="item.checked">
        {{ item.text }}
        </ion-toggle> -->
        <a class="item"  ng-click=" modal.show()">
          意见反馈
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ui-sref="tab.language">
          语言/Language
          <i class="icon ion-chevron-right right"></i>
        </a>
        <a class="item"  ng-click=" modal.show()">
          设置
          <i class="icon ion-chevron-right right"></i>
        </a>
      </div>
    </div>
    <!-- 未登录的情况下 -->

    <!--登录模块-->
    <script id="templates/M_modal.html" type="text/ng-template">
      <ion-modal-view id="QR_page">
        <ion-header-bar class="bar bar-header padding">
            <h1 class="title">
            <button class="button button-clear button-primary" ng-click="close()">关闭</button>
            {{m_title}}
            </h1>
        </ion-header-bar>
        <ion-content class="padding">
            <!-- 登录模块 -->
            <div id="login" ng-if="display_login">
              <div class="button-bar sub_header_list">
                  <a class="button button-clear" ng-click="changeModel(0)" ng-class="{true:'selected',false:'unselected'}[show_M == 0]">验证码登录</a>
                  <a class="button button-clear" ng-click="changeModel(1)" ng-class="{true:'selected',false:'unselected'}[show_M == 1]">密码登录</a>
              </div>
              <form action="" ng-if="pwd_login_2" ><!--常规登录-->
                  <p class="no_pwd">若忘记密码，请使用验证码登录</p>
                  <div class="login_list">
                    <input type="text" placeholder="输入手机号" ng-class="{'phone':true,'e_act':true}" ng-model="n_user_info.user_num" ng-focus="phone_test()">
                    <span class="notice">{{reg_notice_phone}}</span>
                  </div>
                  <div class="login_list" style="position:relative;">
                    <input id="pwd_1" type="password" placeholder="请输入密码" ng-class="{'phone':true,'e_act':true}" ng-model="n_user_info.user_pwd" ng-focus="verification_test()">
                    <span class="show" ng-click="show_pwd_s()">{{show_pwd_value}}</span>
                    <span class="notice" >{{reg_notice_pwd}}
                      <span class="remember_pwd" >
                         <!-- ng-checked="ischecked"  -->
                        <input type="checkbox" hidden  ng-model="ischecked" ng-checked="ischecked" id="mar"/>
                        <label ng-click="toggle_pwd()">记住密码</label>
                      </span>
                    </span>
                  </div>
                  <div class="login_list">
                    <button type="button" id = "login_btn_1" ng-class="{'login_btn_def':true,'login_btn_act':true}" ng-click = "login_pwd()">登 &nbsp; 录</button>
                    <span class="notice">{{pwd_login_res}}</span>
                  </div>
              </form>

              <form action="" ng-if="test_code_login_2"><!--快捷登录-->
                  <p class="no_pwd"></p>
                  <div class="login_list" style="position:relative;border-color:#A58648">
                       
                      <div class="item item-input item-select" style="width:65px;position:absolute;top:0px;left:0px;padding:0;height:30px;">
                        <!-- 86中国 82韩国  65新加坡 -->
                        <select style="max-width:100%;" id = 'mine_DL_area'>
                          <option value = '86'>+86</option>
                          <option value = '82'>+82</option>
                          <option value = '65'>+65</option>
                        </select>
                      </div>

                      <input type="text" style="padding-left:74px;" placeholder="输入手机号" ng-class="{'phone':true,'e_act':true}" ng-model="user_info.user_num" ng-focus="phone_test()">
                    <span class="notice" >{{phone_tc}}</span>
                  </div>
                  <div class="login_list">
                    <input type="text"placeholder="输入验证码" ng-class="{'num':true,'e_act':true}"ng-model="user_info.test_code" ng-focus="verification_test()">
                    <a ng-click="get_test_code($event)" ng-bind="captcha.paracont" class="test_btn">发送验证码</a>
                    <span class="notice" >{{test_code_tc}}  </span>
                  </div>
                  <div class="login_list">
                    <button type="button" id = "login_btn" ng-class="{'login_btn_def':true,'login_btn_act':true}" ng-click = "LOGIN()">登 &nbsp; 录</button>
                  </div>
              </form>
              <p class="change">
                  还不是会员，<span style="color:#A58648;"ng-click="change_page(1)" >马上注册</span>
              </p>
            </div>

            <!-- 注册模块 -->
            <div id="register" ng-if="display_register">
              <form action="" style="margin-top:30px;">
                <div class="login_list" style="position:relative;border-color:#A58648">
                       
                      <div class="item item-input item-select" style="width:65px;position:absolute;top:0px;left:0px;padding:0;height:30px;">
                        <!-- 86中国 82韩国  65新加坡 -->
                        <select style="max-width:100%;" id = 'mine_ZC_area'>
                          <option value = '86'>+86</option>
                          <option value = '82'>+82</option>
                          <option value = '65'>+65</option>
                        </select>
                      </div>

                      <input type="text" style="padding-left:74px;" placeholder="输入手机号" ng-class="{'phone':true,'e_act':true}" ng-model="register_info.phone"  ng-focus = "hide_notice()">
                  <span class="notice">{{r_phone_num}}</span>
                </div>
                <div class="login_list" style="position:relative;">
                  <input id="pwd_1" type="password" placeholder="请输入密码" ng-class="{'phone':true,'e_act':true}" ng-model="register_info.pwd" ng-focus = "hide_notice()">
                  <span class="show" ng-click="show_pwd_s()">{{show_pwd_value}}</span>
                  <span class="notice" >
                   {{r_pwd_num}}
                  </span>
                </div>
                <div class="login_list">
                  <input type="text"placeholder="输入验证码" ng-class="{'num':true,'e_act':true}"ng-model="register_info.code" ng-focus = "hide_notice()" >
                  <a ng-click="register_code($event)" ng-bind="captcha.paracont" class="test_btn">发送验证码</a>
                  <span class="notice" >{{r_pwd_login_res_code}} </span>
                </div>
                <div class="login_list">
                  <button type="button" id = "login_btn_1" ng-class="{'login_btn_def':true,'login_btn_act':true}" ng-click = "register()">注&nbsp;册</button>
                  <span class="notice" >
                    {{r_pwd_login_res}}
                  </span>
                </div>
              </form>
              <p class="change">
                  已是会员，<span style="color:#A58648;"ng-click="change_page(0)" >马上登录</span>
              </p>
            </div>
          </ion-content>
      </ion-modal-view>
    </script>
    <!--登录模块-->
  </ion-content>
</ion-view>

